package org.java.async;

import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.CompletableFuture;

/**
 * @author: zyr
 * @date: 2025/2/28 星期五
 * @description:
 */
@Slf4j
public class CompletePrinciple {
    public static void main(String[] args) {
        CompletableFuture<String> baseFuture = CompletableFuture.completedFuture("Base Future");
        System.out.println(baseFuture.thenApply((r) -> r + " Then Apply").join());
        baseFuture.thenAccept(System.out::println).thenAccept((Void) -> System.out.println("Void"));
    }
}
